{temp('html/recruit/pc/head')}
<script>
function gb(x){//改变验证方式
	if(x == 1){
		document.getElementById('x1').style.display = 'block';
		document.getElementById('x2').style.display = 'none';	
	}else{
		document.getElementById('x2').style.display = 'block';
		document.getElementById('x1').style.display = 'none';	
	}
}
function fsyzm(tt){//发送验证码
	if(tt == '1'){
		var name = $("#name").val();
		var type = 2;
		var lx = 3;
	}else{
		var type = $("#type").val();
		var lx = 2;
		if(type == 1){
			var name = $("#phone").val();
		}else{
			var name = $("#email").val();
		}
	}
	$.post('{$_url}/?act=ruser&met=fsyzm',{name:name,type:type,lx:lx},function(data){
		alert(data);
		if(data == '发送成功'){
			number(tt);
		}
	});
}
var time = 60,timee = 60,t;
function number(tt){//计时
	if(tt == '1'){
		var obj = $("#new #numbers");
		t=setTimeout("number("+tt+")",1000);
		if(time > 0){
			obj.html('<div class="w_110 h_35 l_h35 bc_E0E0E0 c_656565 t_c f_l l_m10">'+time+'秒后获取</div>'); 
			time--;
		}
		if(time == 0){
			time = 60;
			obj.html('<div class="w_110 h_35 l_h35 bc_E16400 c_FFF t_c f_l l_m10 point" onclick="fsyzm('+tt+')">重新获取验证码</div>'); 
			clearTimeout(t);
		}
	}else{
		var obj = $("#old #numbers");
		t=setTimeout("number("+tt+")",1000);
		if(timee > 0){
			obj.html('<div class="w_110 h_35 l_h35 bc_E0E0E0 c_656565 t_c f_l l_m10">'+timee+'秒后获取</div>'); 
			timee--;
		}
		if(timee == 0){
			timee = 60;
			obj.html('<div class="w_110 h_35 l_h35 bc_E16400 c_FFF t_c f_l l_m10 point" onclick="fsyzm('+tt+')">重新获取验证码</div>'); 
			clearTimeout(t);
		}
	}
}
function yz(){
	var type = $("#type").val();
	if(type == 1){
		var name = $("#phone").val();
	}else{
		var name = $("#email").val();
	}
	var yzm = $("#lyzm").val();
	$.post('{$_url}/?act=ruser&met=xgyz',{name:name,type:type,yzm:yzm,lx:2},function(data){
		alert(data);
	});
}
function xg(){
	var name = $("#name").val();
	var yzm = $("#yzm").val();
	$.post('{$_url}/?act=ruser&met=xgtj',{type:2,name:name,yzm:yzm},function(data){
		alert(data);
		if(data == '修改成功'){
			location.href='{$_url}/?act=ruser&met=xgyx';
		}
	});
}
</script>
</head>
<body>
	{temp('html/recruit/pc/ruser/toubu')}

		{temp('html/recruit/pc/ruser/left')}
				<!--右侧-->
				<div class="w_804 l_m5 f_r bc_FFF bor_C6">
					<!--标题-->
					<div class="t_m15 l_m20 t_l">
						<span class="f_s20 c_323131">修改E-mail</span>
						<span class="c_7D7D7D">(请填写正确的EMail地址，否则您可能无法正常接收企业邮件)</span>
					</div>
					<!--标题结束-->
					<!--分割线-->
					<div class="bor_C6 bor_di_none t_m10"></div>
					<!--分割线结束-->
					<!--修改内容-->
					<div class="t_m20 l_m40 t_l">
						{if(@$rs['email'])}
						<!--验证方式-->
						<div class="w_bai t_m15 dis_inline">
							<div class="f_l t_m8 l_m5">
								<span class="c_656565">验证方式</span>
							</div>
							<div class="f_l l_m8">
								<div class="select-outer select-wh120 f_l">
									<div class="select-inner">
										<select id="type" class="select-h" onChange="gb(this.value)">
						        			<option value="2">邮箱</option>
		                               		{if(@$rs['phone'])}
		                               		<option value="1">手机</option>
		                               		{/if}
						        		</select>
									</div>
								</div>
							</div>
						</div>
						<!--验证方式结束-->
						<!--验证邮箱-->
						<div id="x2" class="w_bai t_m15 dis_inline">
							<div class="f_l t_m8 l_m5">
								<span class="c_656565">验证邮箱</span>
							</div>
							<div class="f_l"  style="margin-left:8px!important;margin-left:4px">
								<input type="text" class="inp" id="email" value="{if(@$rs['email'])}{$rs['email']}{/if}" disabled="disabled" />
							</div>
						</div>
						<!--验证邮箱结束-->
						<!-- 如果有手机的话可以选择验证方式 -->
                        {if(@$rs['phone'])}
                        <div id="x1" class="w_bai t_m15 dis_inline" style="display:none;">
                        	<div class="f_l t_m8 l_m5">
								<span class="c_656565">验证手机</span>
							</div>
                            <div class="f_l"  style="margin-left:8px!important;margin-left:4px">
								<input type="text" class="inp" id="phone" value="{if(@$rs['phone'])}{$rs['phone']}{/if}" disabled="disabled" />
							</div>
                        </div>
                        {/if}
                        <!--验证码-->
						<div id="old" class="w_bai t_m15 dis_inline">
							<div class="f_l t_m8 l_m5">
								<span class="c_656565">&nbsp;&nbsp;&nbsp;验证码&nbsp;</span>
							</div>
							<div class="f_l" style="margin-left:5px!important;margin-left:3px">
								<input type="text" id="lyzm" class="inp_yan" />
							</div>
							<div class="f_l l_m5" id="numbers">
								<div class="w_110 h_35 l_h35 bc_E16400 c_FFF t_c f_l l_m10 point" onClick="fsyzm(2)">
									获取验证码
								</div>
							</div>
							<div class="f_l l_m10">
								<div class="w_110 h_35 l_h35 bc_137ABF c_FFF t_c point" onClick="yz()">
									点击验证
								</div>
							</div>
						</div>
						<!--验证码结束-->
                        <!--验证按钮-->
						<div class="w_bai t_m10 c_656565">
							<span class="f_l w_65">&nbsp;</span>
							<span class="f_l l_m5" style="_margin-left:10px">
								获取验证码成功后，填写并点击右侧的点击验证按钮
							</span>
						</div>
						<!--验证按钮结束-->
						{/if}
						<!--新E-mail-->
						<div class="w_bai t_m25 dis_inline">
							<div class="f_l l_m5 t_m8">
								<span class="c_656565">&nbsp;&nbsp;&nbsp;新邮箱</span>
							</div>
							<div class="f_l" style="margin-left:10px!important;margin-left:5px">
								<input type="text" class="inp" id="name" />
							</div>
						</div>
						<!--新E-mail结束-->
						<!--验证码-->
						<div id="new" class="w_bai t_m15 dis_inline">
							<div class="f_l l_m5 t_m8">
								<span class="c_656565">&nbsp;&nbsp;&nbsp;验证码&nbsp;</span>
							</div>
							<div class="f_l" style="margin-left:5px!important;margin-left:3px">
								<input type="text" id="yzm" class="inp_yan" />
							</div>
							<span id="numbers">
								<div class="w_110 h_35 l_h35 bc_E16400 c_FFF t_c f_l l_m10 point" onClick="fsyzm(1)">
									获取验证码
								</div>
							</span>
						</div>
						<!--验证码结束-->
						<!--确认按钮-->
						<div class="w_bai t_m40 b_m50 dis_inline">
							<div class="f_l w_65">&nbsp;</div>
							<div class="f_l l_m4 w_200 h_35 l_h35 bc_E16400 c_FFF t_c point" style="_margin-left:9px"
								onClick="xg()" 
								>
								修改E-mail
							</div>
						</div>
						<!--确认按钮结束-->
					</div>
					<!--修改内容结束-->
				</div>
				<!--右侧结束-->
			</div>
			<!--详细结束-->
		</div>
		<!--主体内容结束-->
{temp('html/recruit/pc/foot')}